Trò chơi đua xe động vật trong UNITY Engine
114.744 lượt xem;
- InterpolationPowOut.cs
- Interpolations /
- Bapk /
- Scripts /
- Assets /
- project /
1 using UnityEngine;
2 using System.Collections;
3
4 public class InterpolationPowOut : InterpolationPow {
5
6 public InterpolationPowOut(int power) : base(power)
7 { }
8
9 public float apply(float a)
10 {
11 return Mathf.Pow(a - 1, power) * (power % 2 == 0 ? -1 : 1) + 1;
12 }
13 }
2 using System.Collections;
3
4 public class InterpolationPowOut : InterpolationPow {
5
6 public InterpolationPowOut(int power) : base(power)
7 { }
8
9 public float apply(float a)
10 {
11 return Mathf.Pow(a - 1, power) * (power % 2 == 0 ? -1 : 1) + 1;
12 }
13 }